-- GENERATED SPELL FOR [Commander Kolurg] --


function spell0_26798(pUnit, Event) --@Battle Shout,Self--
pUnit:FullCastSpellOnTarget(31403,pUnit)
pUnit:RegisterEvent('Sorts_26798', 603, 1)
end

function spell1_26798(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(60067,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26798', 2000, 1)
end

function spell2_26798(pUnit, Event) --@Frightening Shout,n/a--
pUnit:FullCastSpellOnTarget(19134,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26798', 6272, 1)
end

function spell3_26798(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(38619,pUnit)
pUnit:RegisterEvent('Sorts_26798', 569, 1)
end

function spell4_26798(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(38618,pUnit)
pUnit:RegisterEvent('Sorts_26798', 2000, 1)
end

function Sorts_26798(pUnit, Event)
local choix_sorts_26798 = math.random(0, 4)
if choix_sorts_26798 == 0 then
pUnit:RegisterEvent('spell0_26798', 1, 1)
end
if choix_sorts_26798 == 1 then
pUnit:RegisterEvent('spell1_26798', 1, 1)
end
if choix_sorts_26798 == 2 then
pUnit:RegisterEvent('spell2_26798', 1, 1)
end
if choix_sorts_26798 == 3 then
pUnit:RegisterEvent('spell3_26798', 1, 1)
end
if choix_sorts_26798 == 4 then
pUnit:RegisterEvent('spell4_26798', 1, 1)
end
end

function mob26798_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26798', math.random(1500, 3000), 1)
end

function mob26798_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26798_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26798_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26798, 1, 'mob26798_Action')
RegisterUnitEvent(26798, 2, 'mob26798_Leave')
RegisterUnitEvent(26798, 3, 'mob26798_Kill')
RegisterUnitEvent(26798, 4, 'mob26798_Die')
